
#include "Base.h"
#include "Graphics\Effects\IEffectPass.h"
#include "Graphics\Effects\IEffect.h"
#include "OGLEffect.h"
#include "OGLMacro.h"
#include "OGLShader.h"

namespace CasaEngine
{

	/**
	 *
	 */
	COGLEffectPass::COGLEffectPass(COGLEffect * pEffect_, COGLShader *pShader_) :
		IEffectPass(pEffect_), 
		m_pShader(pShader_)
	{
		m_pEffect =  pEffect_;

		IEffectPass::SetShader(pShader_);
	}

	/**
	 *
	 */
	COGLEffectPass::~COGLEffectPass()
	{
	}

	/**
	 * 
	 */
	void COGLEffectPass::Begin()
	{
		GLCheck(glUseProgram(m_pShader->ProgramID()));
	}

	/**
	 * 
	 */
	void COGLEffectPass::End()
	{
		GLCheck(glUseProgram(0));
		//Do nothing ?
	}

} // namespace CasaEngine
